Scottish sea captain who was hired to protect British shipping in the Indian Ocean and then was accused of piracy and hanged (1645-1701)